#include <func.h>

void *pthFunc(void * p)
{
    long a =(long)p;
    printf("this is child_thread,p = %ld\n",p);
    pthread_exit((void*)2);
}

int main(int argc,char **argv)
{
    pthread_t pthid;
    long ret; 
    ret = pthread_create(&pthid,NULL,pthFunc,(void*)1);
    THREAD_ERROR_CHECK(ret,"pthread_create");
    void* retVal;
    pthread_join(pthid,&retVal);
    long tmp =(long)retVal;
    printf("this is main_thread, retVal = %ld\n",tmp);
    return 0;
}

